package com.onec.service.trade.controller;


import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.fastjson.JSON;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author onec
 */
@RestController
@RequestMapping(value = "/merchant")
public class TestController extends  BaseTradeController{

    private static final Logger logger = LoggerFactory.getLogger(TestController.class);


    @RequestMapping("/test")
    @SentinelResource("hello")
    public String test(HttpServletRequest request, HttpServletResponse response) {
        logger.info("trade: 日志");
        return JSON.toJSONString("");
    }

}
